<?php
session_start();
function menu()
{
?>	
	<li><a href='#'>Home</a></li>
<?php	
}
include_once('header.php');
?>
<?php
include_once('includes/db.php');

$str="SELECT * FROM `article`";
$result=mysql_query($str);
$num=mysql_num_rows($result);
echo "<h3><a href='insert.php'>Add article</a></h3>";
echo "<table class='art-tab'>";
echo "<tr style='background-color:#000;color:#fff'><td>title</td><td>edit</td><td>delete</td></tr>";
for($i=0;$i<$num;$i++)
{
	$row=mysql_fetch_array($result);	
	echo '<tr>';
	echo '<td>'.$row['title'].'</td>';
	echo "<td><b><a href='edit.php?id=".$row['id']."'>edit</a></b></td>";
	echo "<td><b><a href='delete.php?id=".$row['id']."'>delete</a></b></td>";
	echo '</tr>';
	
}
echo '</table>';
echo "<h3><a href='storeadd.html'>Add Advertisement</a></h3>";
?>
<?php
include_once('footer.php');
?>